package com.iman.sumer.vo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class QuestionVo {
	private long quizId;
	private Long courseId;
	private String title;
	private String content;
	private Date createDate;
	private long quizUid;
	private int viewCnt;
	private int delYn;
	private Date updateDate;
	// answer count from questionTable
	private int answerCnt;
	private String userName;
	private String courseName;
	// from drm_user.user_himg
	private String userIcon;
	private List<AnswerVo> answersOfQuestion = new ArrayList<AnswerVo>();
	// answer count from answersOfQuestion object
	private int anserCount;
	
	public long getQuizId() {
		return quizId;
	}

	public void setQuizId(long quizId) {
		this.quizId = quizId;
	}

	public Long getCourseId() {
		return courseId;
	}

	public void setCourseId(Long courseId) {
		this.courseId = courseId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public long getQuizUid() {
		return quizUid;
	}

	public void setQuizUid(long quizUid) {
		this.quizUid = quizUid;
	}

	public int getViewCnt() {
		return viewCnt;
	}

	public void setViewCnt(int viewCnt) {
		this.viewCnt = viewCnt;
	}

	public int getDelYn() {
		return delYn;
	}

	public void setDelYn(int delYn) {
		this.delYn = delYn;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public int getAnswerCnt() {
		return answerCnt;
	}

	public void setAnswerCnt(int answerCnt) {
		this.answerCnt = answerCnt;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public List<AnswerVo> getAnswersOfQuestion() {
		return answersOfQuestion;
	}

	public void setAnswersOfQuestion(List<AnswerVo> answersOfQuestion) {
		this.answersOfQuestion = answersOfQuestion;
	}

	public String getUserIcon() {
		return userIcon;
	}

	public void setUserIcon(String userIcon) {
		this.userIcon = userIcon;
	}

	public int getAnserCount() {
		this.anserCount = this.answersOfQuestion==null? 0: this.answersOfQuestion.size(); 
		return anserCount;
	}
}
